﻿using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation;
using MySql.Data.MySqlClient;

namespace Easy.Common
{

    public class MySqlDatabase : Database
    {
        public MySqlDatabase(string connectionString)
            : base(connectionString, MySqlClientFactory.Instance)
        {
        }

        public MySqlDatabase(string connectionString, IDataInstrumentationProvider instrumentationProvider)
            : base(connectionString, MySqlClientFactory.Instance, instrumentationProvider)
        {
        }

        protected override void DeriveParameters(System.Data.Common.DbCommand discoveryCommand)
        {
            MySqlCommandBuilder.DeriveParameters((MySqlCommand)discoveryCommand);
        }
    }
}
